from kivy.app import App
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.button import Button

class MyApp(App):
    def build(self):
        # 创建一个水平布局
        layout = BoxLayout(orientation='horizontal', spacing=10, padding=10)

        # 添加按钮
        layout.add_widget(Button(text='Button 1'))
        layout.add_widget(Button(text='Button 2'))
        layout.add_widget(Button(text='Button 3'))

        return layout

if __name__ == '__main__':
    MyApp().run()